package jp.oesf.malfoy.dao;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class RssSQLiteOpenHelper extends SQLiteOpenHelper {

	public static final String RSS_DATABASE = "RSS_DATABASE";
	public static final String RSS_TABLE = "RSS";
	public static final String RSS_RIREKI_TABLE = "RSS_RIREKI";
	
	public static final String RIREKI_URL = "urldata";
	public static final String RIREKI_HINDO = "hindo";
	
	public static final String RSS_TITLE = "title";
	public static final String RSS_KEY = "rireki_key";
	public static final String RSS_LINK = "link";
	public static final String RSS_DESCRI = "description";
	public static final String RSS_PUBDATA = "pubDate";
	public static final String RSS_CATEGORY = "category";
	
	
	
	public RssSQLiteOpenHelper(Context context) {
		super(context, RSS_DATABASE, null, 1);
		
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		db.execSQL("CREATE TABLE RSS(_id INTEGER PRIMARY KEY AUTOINCREMENT" +
				",rireki_key INTEGER" +
				",title TEXT " +
				",link TEXT " +
				",description TEXT " +
				",pubDate TEXT " +
				",category TEXT );");
		
		db.execSQL("CREATE TABLE RSS_RIREKI(_id INTEGER PRIMARY KEY AUTOINCREMENT" +
				",urldata TEXT " +
				",hindo INTEGER );");		
		
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		// TODO Auto-generated method stub
		
	}

}
